import Vue from 'vue'
import App from './App'
// import store from './store'
import request from 'common/request'

//常用组件，全局注册
import tsBadge from 'components/teaset/components/ts-badge.vue';
import tsIcon from 'components/teaset/components/ts-icon.vue';
import tsTag from 'components/teaset/components/ts-tag.vue';
import tsLoadMore from 'components/teaset/components/ts-load-more.vue';
import tsButton from 'components/teaset/components/ts-button.vue';

//全局注册
Vue.component('ts-badge', tsBadge);
Vue.component('ts-icon', tsIcon);
Vue.component('ts-tag', tsTag);
Vue.component('ts-load-more', tsLoadMore);
Vue.component('ts-button', tsButton);


Vue.config.productionTip = false;

//挂载全局对象
// Vue.prototype.$store = store

//以下对象需要取消，没有使用的必要性
Vue.prototype.$request = request

Vue.prototype.$log=function(obj){
	if(typeof(obj)=='undefined'){return}
	if(typeof(obj)=='object'){
		console.log(JSON.stringify(obj))
	}else{
		console.log(obj)
	}
}

//开发阶段使用Easy-mock模拟请求接口
//发行版本需要替换为实际的地址
Vue.prototype.$API_BASE = 'https://www.easy-mock.com/mock/5bcc2080e8326e1cdcb85224/api' //API请求的基础地址


//注册全局组件
App.mpType = 'app'
const app = new Vue({
	// store,
	...App
})
app.$mount()
